//
//  FMGVideoPlayView.h
//  网络视频播放(AVPlayer)
//
//  Created by apple on 15/8/16.
//  Copyright (c) 2015年 FMG. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>




@protocol  MyPlayViewDelegate <NSObject>
- (void)restoreFunc;
- (void)restorePlay;
- (NSInteger)takePlayHeight;
@end

@interface FMGVideoPlayView : UIView

+ (instancetype)videoPlayView;

@property(nonatomic, weak) id<MyPlayViewDelegate> controlDelegate;


//@property (nonatomic, strong) AVPlayerItem *playerItem;
@property (nonatomic, strong) NSString *currentMediaURL;
@property (weak, nonatomic) IBOutlet UIView *currentLiveView;

///* 包含在哪一个控制器中 */
@property (nonatomic, weak) UIViewController *contrainerViewController;

- (void)initPlaying:(NSString *)mediaURL;

- (void)preparePlay;

- (void)startPlaying;

- (void)fullPlaying;

- (void)restorePlaying;

- (void)pausePlaying;

- (void)resumePlaying;

- (void)destroyPlaying;

- (void)updateProgressInfo;

- (void) mediaIsPreparedToPlayDidChange:(NSNotification*)notification;

- (BOOL)isPlaying;

@end
